<template>
  <el-container>
    <!-- 头部区域 -->
    <el-header>Header</el-header>

    <el-container>
      <!-- 侧边栏区域 -->
      <el-aside width="200px">
        <el-menu
          :default-active="$route.path"
          router
          unique-opened
          background-color="#ffe7ba"
          text-color="#4F4F4F"
        >
          <!-- 一级菜单 -->
          <el-submenu index="1">
            <template slot="title">
              <i class="el-icon-user-solid"></i>
              <span>用户管理</span>
            </template>
            <!-- 二级菜单 -->
            <el-menu-item index="/admin_users/list" icon="el-icon-menu">
              <i class="el-icon-user"></i>管理员列表
            </el-menu-item>
          </el-submenu>
          <el-submenu index="2">
            <template slot="title">
              <i class="el-icon-s-grid"></i>
              <span>分类管理</span>
            </template>
            <el-menu-item index="/categories/list" icon="el-icon-menu">
              <i class="el-icon-s-operation"></i>分类列表
            </el-menu-item>
            <el-menu-item index="/categories/create" icon="el-icon-menu">
              <i class="el-icon-circle-plus-outline"></i>新建分类
            </el-menu-item>
          </el-submenu>
          <el-submenu index="3">
            <template slot="title">
              <i class="el-icon-s-operation"></i>
              <span>英雄管理</span>
            </template>
            <el-menu-item-group>
              <template slot="title">英雄管理</template>
              <el-menu-item index="/heroes/create" icon="el-icon-circle-plus-outline">
                <i class="el-icon-s-operation"></i>创建英雄
              </el-menu-item>
              <el-menu-item index="/heroes/list" icon="el-icon-mobile">
                <i class="el-icon-circle-plus-outline"></i>英雄列表
              </el-menu-item>
            </el-menu-item-group>
            <el-menu-item-group>
              <template slot="title">装备管理</template>
              <el-menu-item index="/equips/list" icon="el-icon-menu">
                <i class="el-icon-s-operation"></i>装备列表
              </el-menu-item>
              <el-menu-item index="/equips/create" icon="el-icon-menu">
                <i class="el-icon-circle-plus-outline"></i>新建装备
              </el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="4">
            <template slot="title">
              <i class="el-icon-notebook-2"></i>
              <span>文章管理</span>
            </template>
            <el-menu-item index="/articles/list" icon="el-icon-menu">
              <i class="el-icon-s-operation"></i>文章列表
            </el-menu-item>
            <el-menu-item index="/articles/create" icon="el-icon-menu">
              <i class="el-icon-circle-plus-outline"></i>新建文章
            </el-menu-item>
          </el-submenu>
          <el-submenu index="5">
            <template slot="title">
              <i class="el-icon-suitcase-1"></i>
              <span>广告管理</span>
            </template>
            <el-menu-item index="/ads/list" icon="el-icon-menu">
              <i class="el-icon-s-operation"></i>广告列表
            </el-menu-item>
            <el-menu-item index="/ads/create" icon="el-icon-menu">
              <i class="el-icon-circle-plus-outline"></i>新建广告
            </el-menu-item>
          </el-submenu>
        </el-menu>
      </el-aside>
      <!-- 右边主体区域 -->
      <el-main>
        <router-view :key="$route.path"></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
export default {
  name: 'Home',
  components: {}
}
</script>
<style scoped>
.el-container {
  height: 100%;
}
.el-header {
  background-color: #ee9572;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.el-aside {
  background-color: #ffcc99;
  color: #fff;
}

.el-main {
  background-color: #f5f5dc;
}
</style>
